package com.ruoyi.TraditionalCultureSys.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.TraditionalCultureSys.mapper.TraditionalBuildingsMapper;
import com.ruoyi.TraditionalCultureSys.domain.TraditionalBuildings;
import com.ruoyi.TraditionalCultureSys.service.ITraditionalBuildingsService;

/**
 * 历史建筑Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-24
 */
@Service
public class TraditionalBuildingsServiceImpl implements ITraditionalBuildingsService 
{
    @Autowired
    private TraditionalBuildingsMapper traditionalBuildingsMapper;

    /**
     * 查询历史建筑
     * 
     * @param id 历史建筑主键
     * @return 历史建筑
     */
    @Override
    public TraditionalBuildings selectTraditionalBuildingsById(Long id)
    {
        return traditionalBuildingsMapper.selectTraditionalBuildingsById(id);
    }

    /**
     * 查询历史建筑列表
     * 
     * @param traditionalBuildings 历史建筑
     * @return 历史建筑
     */
    @Override
    public List<TraditionalBuildings> selectTraditionalBuildingsList(TraditionalBuildings traditionalBuildings)
    {
        return traditionalBuildingsMapper.selectTraditionalBuildingsList(traditionalBuildings);
    }

    /**
     * 新增历史建筑
     * 
     * @param traditionalBuildings 历史建筑
     * @return 结果
     */
    @Override
    public int insertTraditionalBuildings(TraditionalBuildings traditionalBuildings)
    {
        return traditionalBuildingsMapper.insertTraditionalBuildings(traditionalBuildings);
    }

    /**
     * 修改历史建筑
     * 
     * @param traditionalBuildings 历史建筑
     * @return 结果
     */
    @Override
    public int updateTraditionalBuildings(TraditionalBuildings traditionalBuildings)
    {
        return traditionalBuildingsMapper.updateTraditionalBuildings(traditionalBuildings);
    }

    /**
     * 批量删除历史建筑
     * 
     * @param ids 需要删除的历史建筑主键
     * @return 结果
     */
    @Override
    public int deleteTraditionalBuildingsByIds(Long[] ids)
    {
        return traditionalBuildingsMapper.deleteTraditionalBuildingsByIds(ids);
    }

    /**
     * 删除历史建筑信息
     * 
     * @param id 历史建筑主键
     * @return 结果
     */
    @Override
    public int deleteTraditionalBuildingsById(Long id)
    {
        return traditionalBuildingsMapper.deleteTraditionalBuildingsById(id);
    }

    @Override
    public List<TraditionalBuildings> getAllTraditionalBuildings() {
        return traditionalBuildingsMapper.getAllTraditionalBuildings();
    }
}
